---
title: clsTaskSourceCodeCollection
summary: API reference for clsTaskSourceCodeCollection.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks
reference_type: embedded
---

# clsTaskSourceCodeCollection

`clsTaskSourceCodeCollection` loads all `TASK_SOURCE_CODE` rows and provides the code↔enum translation and the full set of well-known source-system code constants consumed throughout the library and by descendant task types.

## Purpose
- Retrieve the full source-code reference list ([SQL-012](../../sql/SQL-012-select-task-source-code-list.md)).
- Translate between the database code string and the `TaskSourceSystem` enum in both directions, defaulting unrecognized codes to `NotAssigned` ([BR-025](../../business-rules.md#br-025-unrecognized-codes-map-to-a-safe-default)).
- Expose the well-known source-system code constants (`AV`, `BATCH`, `CBP`, `CLAIM`, `CLMC`, `COVB`, `CLMM`, `IMAGE`, `LEGAL`, `PROV`, `RTW`, `THRDP`, `TITAN`, `WCIS`) so callers avoid hard-coded literals.

## Context
- Namespace: `SAIF.Business.Tasks`
- Assembly/package: `SAIF.Business.Tasks` (embedded in the `LegalMaintenance` web deployment)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `cAudioVisual`, `cBatch`, `cClaimBillPayment`, `cClaims`, `cClaimCost`, `cCoverageB`, `cManageClaims`, `cImaging`, `cLegalNet`, `cProvider`, `cReturnToWork`, `cThirdParty`, `cTitan`, `cWCIS` | `Const cX As String` | Well-known source-system code literals (`AV`, `BATCH`, `CBP`, `CLAIM`, `CLMC`, `COVB`, `CLMM`, `IMAGE`, `LEGAL`, `PROV`, `RTW`, `THRDP`, `TITAN`, `WCIS`) used across the library and by consumers. |
| `TaskSource` | `Shared Function TaskSource(inCode As String) As TaskSourceSystem` | Translates a database source code to the `TaskSourceSystem` enum; unrecognized values return `NotAssigned` ([BR-025](../../business-rules.md#br-025-unrecognized-codes-map-to-a-safe-default)). |
| `TaskSourceCode` | `Shared Function TaskSourceCode(inSourceSystem As TaskSourceSystem) As String` | Translates a `TaskSourceSystem` enum value back to its database code string. |
| `GetCodes` | `Shared Function GetCodes(dpi As IDataPortalInfo) As clsTaskSourceCodeCollection` | Factory/retrieval entry point that loads the entire source-code table ([SQL-012](../../sql/SQL-012-select-task-source-code-list.md)). |
| `Criteria` | `Friend Class Criteria` (nested, implements `IBusinessCriteria`) | Read-only criteria for this code table; write-SQL properties throw `ApplicationException(clsConstants.Messages.InvalidSQLProperty)` ([BR-023](../../business-rules.md#br-023-code-tables-are-read-only-reference-data)). |

## Behavioral notes
- The class is `<Serializable()>`, consistent with remoting/session persistence of BOF objects across the web tier*.
- `TaskSource`/`TaskSourceCode` are used by `clsTaskCollection.AfterRetrieve` to detect an unsupported source system before invoking `NewTask()`, driving [BR-022](../../business-rules.md#br-022-retrieval-of-a-task-with-no-concrete-task-class-is-not-permitted).

## Constraints and usage notes
- Any attempt to use `CreateSQL`/`InsertSQL`/`UpdateSQL`/`DeleteSQL` on this type's `Criteria` throws `ApplicationException(clsConstants.Messages.InvalidSQLProperty)` ([BR-023](../../business-rules.md#br-023-code-tables-are-read-only-reference-data)).

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Related documentation
- [API index](../index.md)
- [clsTaskSourceCode](clsTaskSourceCode.md)
- [Business rules](../../business-rules.md)

## Sources
- SAIF.Business.Tasks/clsTaskSourceCodeCollection.vb
